use explicit_bzero() to zero memory
authorDebian Samba Maintainers <pkg-samba-maint@lists.alioth.debian.org>
Sat, 24 Jan 2026 05:55:25 +0000 (08:55 +0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Sat, 24 Jan 2026 05:55:25 +0000 (08:55 +0300)
commitcaab2ec90e7898dc046ce72e7b1f07e5eb13370c
treee8076d4ea211fab7a7678d2f907842ea8d32e4c9
parent7f5e5503e10e5373ec9f98368ddb6afccab976b7
use explicit_bzero() to zero memory

Samba uses memset_s() to zero-fill unused sensitive memory
areas.  This interface is difficult to use right, and is not
implemented in glibc due to this.  So many parts of samba
link to libreplace to get rep_memset_s().  But glibc provides
explicit_bzero(), so there's no need for this linkage.

Unfortunately there are just insane amount of similar
but non-standard functions, and upstream don't want
to stay on something simple and robust in this context.

Gbp-Pq: Name use-explicit_bzero-to-zero-memory.diff
lib/replace/replace.h